unit ColumnAlign;

interface
uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.Grid, FMX.Layouts,
  FMX.Objects, FMX.Edit, FMX.StdCtrls;

type
    TTextColumn = class(FMX.Grid.TStringColumn)
  private
     FTextAlign : TTextAlign;
  protected
    procedure UpdateColumn; override;
  published
    property TextAlign : TTextAlign read FTextAlign write FTextAlign;
  end;

implementation
   procedure TTextColumn.UpdateColumn;
var
  i, C: Integer;
  LGrid:TCustomGrid;
begin
  inherited;
  LGrid := Grid;
  FUpdateColumn := True;
  try
    { Create controls }
//    if Length(FCellControls) < LGrid.VisibleRows then
//    begin
      C := High(FCellControls);
      SetLength(FCellControls, LGrid.VisibleRows);
      for i := 0 to LGrid.VisibleRows - 1 do
      begin
        (FCellControls[i] as TEdit).TextAlign := FTextAlign;
      end;
    //end;
  finally
    FUpdateColumn := False;
 end;
end;
end.
